﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 审批流程记录基础输入参数
/// </summary>
public class StoreProcessRecordBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 审批类型
    /// </summary>
    [Required(ErrorMessage = "审批类型不能为空")]
    public virtual string FlowType { get; set; }
    
    /// <summary>
    /// 申请批次
    /// </summary>
    public virtual string? BatchNo { get; set; }
    
    /// <summary>
    /// 申请号
    /// </summary>
    [Required(ErrorMessage = "申请号不能为空")]
    public virtual string RequestNo { get; set; }
    
    /// <summary>
    /// 分类Id
    /// </summary>
    public virtual long? StoreTypeId { get; set; }
    
    /// <summary>
    /// 分类名称
    /// </summary>
    public virtual string? StoreTypeName { get; set; }
    
    /// <summary>
    /// 物资Id
    /// </summary>
    public virtual long? MaterialId { get; set; }
    
    /// <summary>
    /// 物资名称
    /// </summary>
    public virtual string? MaterialName { get; set; }
    
    /// <summary>
    /// 物资单价
    /// </summary>
    public virtual decimal? MaterialPrice { get; set; }
    
    /// <summary>
    /// 申请数量
    /// </summary>
    public virtual decimal? Quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public virtual string? Unit { get; set; }
    
    /// <summary>
    /// 物资总价
    /// </summary>
    public virtual decimal? MaterialPriceTotal { get; set; }
    
    /// <summary>
    /// 申请人ID
    /// </summary>
    [Required(ErrorMessage = "申请人ID不能为空")]
    public virtual long? ApplicantId { get; set; }
    
    /// <summary>
    /// 申请人姓名
    /// </summary>
    public virtual string? ApplicantName { get; set; }
    
    /// <summary>
    /// 申请人区域
    /// </summary>
    public virtual string? ApplicantDept { get; set; }
    
    /// <summary>
    /// 接收人Id
    /// </summary>
    public virtual long? ReceiverId { get; set; }
    
    /// <summary>
    /// 接收人姓名
    /// </summary>
    public virtual string? ReceiverName { get; set; }
    
    /// <summary>
    /// 接收人区域
    /// </summary>
    public virtual string? ReceiverDept { get; set; }
    
    /// <summary>
    /// 申请时间
    /// </summary>
    public virtual DateTime? RequestTime { get; set; }
    
    /// <summary>
    /// 预期时间
    /// </summary>
    public virtual DateTime? ExpectedDate { get; set; }
    
    /// <summary>
    /// 完成时间
    /// </summary>
    public virtual DateTime? CompletedTime { get; set; }
    
    /// <summary>
    /// 新增或更新
    /// </summary>
    [Dict(nameof(StatusNewOrChangeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "新增或更新不能为空")]
    public virtual StatusNewOrChangeEnum? StatusNewOrChange { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 审批状态
    /// </summary>
    [Dict(nameof(StatusApprovalEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "审批状态不能为空")]
    public virtual StatusApprovalEnum? ApprovalAction { get; set; }
    
    /// <summary>
    /// 确认负责人ID
    /// </summary>
    public virtual long? ConfirmerId { get; set; }
    
    /// <summary>
    /// 确认负责人姓名
    /// </summary>
    public virtual string? ConfirmerName { get; set; }
    
}

/// <summary>
/// 审批流程记录分页查询输入参数
/// </summary>
public class PageStoreProcessRecordInput : BasePageInput
{
    /// <summary>
    /// 审批类型
    /// </summary>
    public string FlowType { get; set; }
    
    /// <summary>
    /// 申请批次
    /// </summary>
    public string? BatchNo { get; set; }
    
    /// <summary>
    /// 申请号
    /// </summary>
    public string RequestNo { get; set; }
    
    /// <summary>
    /// 分类Id
    /// </summary>
    public long? StoreTypeId { get; set; }
    
    /// <summary>
    /// 分类名称
    /// </summary>
    public string? StoreTypeName { get; set; }
    
    /// <summary>
    /// 物资Id
    /// </summary>
    public long? MaterialId { get; set; }
    
    /// <summary>
    /// 物资名称
    /// </summary>
    public string? MaterialName { get; set; }
    
    /// <summary>
    /// 物资单价
    /// </summary>
    public decimal? MaterialPrice { get; set; }
    
    /// <summary>
    /// 申请数量
    /// </summary>
    public decimal? Quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public string? Unit { get; set; }
    
    /// <summary>
    /// 物资总价
    /// </summary>
    public decimal? MaterialPriceTotal { get; set; }
    
    /// <summary>
    /// 申请人ID
    /// </summary>
    public long? ApplicantId { get; set; }
    
    /// <summary>
    /// 申请人姓名
    /// </summary>
    public string? ApplicantName { get; set; }
    
    /// <summary>
    /// 申请人区域
    /// </summary>
    public string? ApplicantDept { get; set; }
    
    /// <summary>
    /// 接收人Id
    /// </summary>
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 接收人姓名
    /// </summary>
    public string? ReceiverName { get; set; }
    
    /// <summary>
    /// 接收人区域
    /// </summary>
    public string? ReceiverDept { get; set; }
    
    /// <summary>
    /// 申请时间范围
    /// </summary>
     public DateTime?[] RequestTimeRange { get; set; }
    
    /// <summary>
    /// 预期时间范围
    /// </summary>
     public DateTime?[] ExpectedDateRange { get; set; }
    
    /// <summary>
    /// 完成时间范围
    /// </summary>
     public DateTime?[] CompletedTimeRange { get; set; }
    
    /// <summary>
    /// 新增或更新
    /// </summary>
    [Dict(nameof(StatusNewOrChangeEnum), AllowNullValue=true)]
    public StatusNewOrChangeEnum? StatusNewOrChange { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 审批状态
    /// </summary>
    [Dict(nameof(StatusApprovalEnum), AllowNullValue=true)]
    public StatusApprovalEnum? ApprovalAction { get; set; }
    
    /// <summary>
    /// 确认负责人ID
    /// </summary>
    public long? ConfirmerId { get; set; }
    
    /// <summary>
    /// 确认负责人姓名
    /// </summary>
    public string? ConfirmerName { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
    public List<long> SelectKeyList { get; set; }
    
}

/// <summary>
/// 审批流程记录增加输入参数
/// </summary>
public class AddStoreProcessRecordInput
{
    /// <summary>
    /// 审批类型
    /// </summary>
    [Required(ErrorMessage = "审批类型不能为空")]
    [MaxLength(255, ErrorMessage = "审批类型字符长度不能超过255")]
    public string FlowType { get; set; }
    
    /// <summary>
    /// 申请批次
    /// </summary>
    [MaxLength(255, ErrorMessage = "申请批次字符长度不能超过255")]
    public string? BatchNo { get; set; }
    
    /// <summary>
    /// 申请号
    /// </summary>
    [Required(ErrorMessage = "申请号不能为空")]
    [MaxLength(255, ErrorMessage = "申请号字符长度不能超过255")]
    public string RequestNo { get; set; }
    
    /// <summary>
    /// 分类Id
    /// </summary>
    public long? StoreTypeId { get; set; }
    
    /// <summary>
    /// 分类名称
    /// </summary>
    [MaxLength(128, ErrorMessage = "分类名称字符长度不能超过128")]
    public string? StoreTypeName { get; set; }
    
    /// <summary>
    /// 物资Id
    /// </summary>
    public long? MaterialId { get; set; }
    
    /// <summary>
    /// 物资名称
    /// </summary>
    [MaxLength(128, ErrorMessage = "物资名称字符长度不能超过128")]
    public string? MaterialName { get; set; }
    
    /// <summary>
    /// 物资单价
    /// </summary>
    public decimal? MaterialPrice { get; set; }
    
    /// <summary>
    /// 申请数量
    /// </summary>
    public decimal? Quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? Unit { get; set; }
    
    /// <summary>
    /// 物资总价
    /// </summary>
    public decimal? MaterialPriceTotal { get; set; }
    
    /// <summary>
    /// 申请人ID
    /// </summary>
    [Required(ErrorMessage = "申请人ID不能为空")]
    public long? ApplicantId { get; set; }
    
    /// <summary>
    /// 申请人姓名
    /// </summary>
    [MaxLength(255, ErrorMessage = "申请人姓名字符长度不能超过255")]
    public string? ApplicantName { get; set; }
    
    /// <summary>
    /// 申请人区域
    /// </summary>
    [MaxLength(255, ErrorMessage = "申请人区域字符长度不能超过255")]
    public string? ApplicantDept { get; set; }
    
    /// <summary>
    /// 接收人Id
    /// </summary>
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 接收人姓名
    /// </summary>
    [MaxLength(255, ErrorMessage = "接收人姓名字符长度不能超过255")]
    public string? ReceiverName { get; set; }
    
    /// <summary>
    /// 接收人区域
    /// </summary>
    [MaxLength(255, ErrorMessage = "接收人区域字符长度不能超过255")]
    public string? ReceiverDept { get; set; }
    
    /// <summary>
    /// 申请时间
    /// </summary>
    public DateTime? RequestTime { get; set; }
    
    /// <summary>
    /// 预期时间
    /// </summary>
    public DateTime? ExpectedDate { get; set; }
    
    /// <summary>
    /// 完成时间
    /// </summary>
    public DateTime? CompletedTime { get; set; }
    
    /// <summary>
    /// 新增或更新
    /// </summary>
    [Dict(nameof(StatusNewOrChangeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "新增或更新不能为空")]
    public StatusNewOrChangeEnum? StatusNewOrChange { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(128, ErrorMessage = "备注字符长度不能超过128")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 审批状态
    /// </summary>
    [Dict(nameof(StatusApprovalEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "审批状态不能为空")]
    public StatusApprovalEnum? ApprovalAction { get; set; }
    
    /// <summary>
    /// 确认负责人ID
    /// </summary>
    public long? ConfirmerId { get; set; }
    
    /// <summary>
    /// 确认负责人姓名
    /// </summary>
    [MaxLength(64, ErrorMessage = "确认负责人姓名字符长度不能超过64")]
    public string? ConfirmerName { get; set; }
    
}

/// <summary>
/// 审批流程记录删除输入参数
/// </summary>
public class DeleteStoreProcessRecordInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 审批流程记录更新输入参数
/// </summary>
public class UpdateStoreProcessRecordInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 审批类型
    /// </summary>    
    [Required(ErrorMessage = "审批类型不能为空")]
    [MaxLength(255, ErrorMessage = "审批类型字符长度不能超过255")]
    public string FlowType { get; set; }
    
    /// <summary>
    /// 申请批次
    /// </summary>    
    [MaxLength(255, ErrorMessage = "申请批次字符长度不能超过255")]
    public string? BatchNo { get; set; }
    
    /// <summary>
    /// 申请号
    /// </summary>    
    [Required(ErrorMessage = "申请号不能为空")]
    [MaxLength(255, ErrorMessage = "申请号字符长度不能超过255")]
    public string RequestNo { get; set; }
    
    /// <summary>
    /// 分类Id
    /// </summary>    
    public long? StoreTypeId { get; set; }
    
    /// <summary>
    /// 分类名称
    /// </summary>    
    [MaxLength(128, ErrorMessage = "分类名称字符长度不能超过128")]
    public string? StoreTypeName { get; set; }
    
    /// <summary>
    /// 物资Id
    /// </summary>    
    public long? MaterialId { get; set; }
    
    /// <summary>
    /// 物资名称
    /// </summary>    
    [MaxLength(128, ErrorMessage = "物资名称字符长度不能超过128")]
    public string? MaterialName { get; set; }
    
    /// <summary>
    /// 物资单价
    /// </summary>    
    public decimal? MaterialPrice { get; set; }
    
    /// <summary>
    /// 申请数量
    /// </summary>    
    public decimal? Quantity { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>    
    [MaxLength(32, ErrorMessage = "单位字符长度不能超过32")]
    public string? Unit { get; set; }
    
    /// <summary>
    /// 物资总价
    /// </summary>    
    public decimal? MaterialPriceTotal { get; set; }
    
    /// <summary>
    /// 申请人ID
    /// </summary>    
    [Required(ErrorMessage = "申请人ID不能为空")]
    public long? ApplicantId { get; set; }
    
    /// <summary>
    /// 申请人姓名
    /// </summary>    
    [MaxLength(255, ErrorMessage = "申请人姓名字符长度不能超过255")]
    public string? ApplicantName { get; set; }
    
    /// <summary>
    /// 申请人区域
    /// </summary>    
    [MaxLength(255, ErrorMessage = "申请人区域字符长度不能超过255")]
    public string? ApplicantDept { get; set; }
    
    /// <summary>
    /// 接收人Id
    /// </summary>    
    public long? ReceiverId { get; set; }
    
    /// <summary>
    /// 接收人姓名
    /// </summary>    
    [MaxLength(255, ErrorMessage = "接收人姓名字符长度不能超过255")]
    public string? ReceiverName { get; set; }
    
    /// <summary>
    /// 接收人区域
    /// </summary>    
    [MaxLength(255, ErrorMessage = "接收人区域字符长度不能超过255")]
    public string? ReceiverDept { get; set; }
    
    /// <summary>
    /// 申请时间
    /// </summary>    
    public DateTime? RequestTime { get; set; }
    
    /// <summary>
    /// 预期时间
    /// </summary>    
    public DateTime? ExpectedDate { get; set; }
    
    /// <summary>
    /// 完成时间
    /// </summary>    
    public DateTime? CompletedTime { get; set; }
    
    /// <summary>
    /// 新增或更新
    /// </summary>    
    [Dict(nameof(StatusNewOrChangeEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "新增或更新不能为空")]
    public StatusNewOrChangeEnum? StatusNewOrChange { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(128, ErrorMessage = "备注字符长度不能超过128")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 审批状态
    /// </summary>    
    [Dict(nameof(StatusApprovalEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "审批状态不能为空")]
    public StatusApprovalEnum? ApprovalAction { get; set; }
    
    /// <summary>
    /// 确认负责人ID
    /// </summary>    
    public long? ConfirmerId { get; set; }
    
    /// <summary>
    /// 确认负责人姓名
    /// </summary>    
    [MaxLength(64, ErrorMessage = "确认负责人姓名字符长度不能超过64")]
    public string? ConfirmerName { get; set; }
    
}

/// <summary>
/// 审批流程记录主键查询输入参数
/// </summary>
public class QueryByIdStoreProcessRecordInput : DeleteStoreProcessRecordInput
{
}

/// <summary>
/// 审批流程记录导入输入参数
/// </summary>
public class ImportStoreProcessRecordInput : BaseImportInput
{
    /// <summary>
    /// 审批类型
    /// </summary>
    [ImporterHeader(Name = "*审批类型")]
    [ExporterHeader("*审批类型", Width = 15, IsBold = true)]
    public string FlowType { get; set; }    
    
    /// <summary>
    /// 申请批次
    /// </summary>
    [ImporterHeader(Name = "申请批次")]
    [ExporterHeader("申请批次", Width = 20, IsBold = true)]
    public string? BatchNo { get; set; }    
    
    /// <summary>
    /// 申请号
    /// </summary>
    [ImporterHeader(Name = "*申请号")]
    [ExporterHeader("*申请号", Width = 20, IsBold = true)]
    public string RequestNo { get; set; }    
    
    /// <summary>
    /// 分类显示名称（完整路径）
    /// </summary>
    [ImporterHeader(Name = "分类")]
    [ExporterHeader("分类", Width = 25, IsBold = true)]
    public string? StoreTypeDisplayName { get; set; }    
    
    /// <summary>
    /// 物资名称
    /// </summary>
    [ImporterHeader(Name = "物资名称")]
    [ExporterHeader("物资名称", Width = 25, IsBold = true)]
    public string? MaterialName { get; set; }    
    
    /// <summary>
    /// 物资单价
    /// </summary>
    [ImporterHeader(Name = "物资单价")]
    [ExporterHeader("物资单价", Width = 15, IsBold = true, Format = "0.00")]
    public decimal? MaterialPrice { get; set; }    
    
    /// <summary>
    /// 申请数量
    /// </summary>
    [ImporterHeader(Name = "申请数量")]
    [ExporterHeader("申请数量", Width = 15, IsBold = true, Format = "0.00")]
    public decimal? Quantity { get; set; }    
    
    /// <summary>
    /// 单位
    /// </summary>
    [ImporterHeader(Name = "单位")]
    [ExporterHeader("单位", Width = 10, IsBold = true)]
    public string? Unit { get; set; }    
    
    /// <summary>
    /// 物资总价
    /// </summary>
    [ImporterHeader(Name = "物资总价")]
    [ExporterHeader("物资总价", Width = 15, IsBold = true, Format = "0.00")]
    public decimal? MaterialPriceTotal { get; set; }    
    
    /// <summary>
    /// 申请人姓名
    /// </summary>
    [ImporterHeader(Name = "申请人")]
    [ExporterHeader("申请人", Width = 15, IsBold = true)]
    public string? ApplicantName { get; set; }    
    
    /// <summary>
    /// 申请人区域
    /// </summary>
    [ImporterHeader(Name = "申请人区域")]
    [ExporterHeader("申请人区域", Width = 20, IsBold = true)]
    public string? ApplicantDept { get; set; }    
    
    /// <summary>
    /// 接收人姓名
    /// </summary>
    [ImporterHeader(Name = "接收人")]
    [ExporterHeader("接收人", Width = 15, IsBold = true)]
    public string? ReceiverName { get; set; }    
    
    /// <summary>
    /// 接收人区域
    /// </summary>
    [ImporterHeader(Name = "接收人区域")]
    [ExporterHeader("接收人区域", Width = 20, IsBold = true)]
    public string? ReceiverDept { get; set; }    
    
    /// <summary>
    /// 申请时间
    /// </summary>
    [ImporterHeader(Name = "申请时间")]
    [ExporterHeader("申请时间", Width = 20, IsBold = true, Format = "yyyy-MM-dd HH:mm:ss")]
    public DateTime? RequestTime { get; set; }    
    
    /// <summary>
    /// 预期时间
    /// </summary>
    [ImporterHeader(Name = "预期时间")]
    [ExporterHeader("预期时间", Width = 20, IsBold = true, Format = "yyyy-MM-dd HH:mm:ss")]
    public DateTime? ExpectedDate { get; set; }    
    
    /// <summary>
    /// 完成时间
    /// </summary>
    [ImporterHeader(Name = "完成时间")]
    [ExporterHeader("完成时间", Width = 20, IsBold = true, Format = "yyyy-MM-dd HH:mm:ss")]
    public DateTime? CompletedTime { get; set; }    
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Width = 30, IsBold = true)]
    public string? Remark { get; set; }    
    
    /// <summary>
    /// 审批状态
    /// </summary>
    [ImporterHeader(Name = "审批状态")]
    [ExporterHeader("审批状态", Width = 15, IsBold = true)]
    public StatusApprovalEnum? ApprovalAction { get; set; }    
    
    /// <summary>
    /// 确认负责人姓名
    /// </summary>
    [ImporterHeader(Name = "审批人")]
    [ExporterHeader("审批人", Width = 15, IsBold = true)]
    public string? ConfirmerName { get; set; }    
    
    /// <summary>
    /// 创建时间
    /// </summary>
    [ImporterHeader(Name = "创建时间")]
    [ExporterHeader("创建时间", Width = 20, IsBold = true, Format = "yyyy-MM-dd HH:mm:ss")]
    public DateTime? CreateTime { get; set; }    
}

